package com.controller;

import com.pojo.User;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Ychiha
 * @version 1.0
 * @date 8/1/2022 下午5:34
 */
@RestController
@Controller
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping("/user")
    public List<User> getUserList(){
        System.out.println(userService.getUserList());
        return userService.getUserList();
    }

}
